using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.IO;
using System.Xml;

using PlugNT.Common;
using PlugNT.Database;
using PlugNT.Database.Common.Simple;
using PlugNT.Cms.Custom;
using PlugNT.Cms.BLL;
using PlugNT.Cms.Model;

namespace PlugNT.App.UCenter
{




    public class UcConfig 
    {

        public const string assName = "UCenter";
        public const string assVersion = "3.6";

        public readonly static bool assSetuped = false;

        public readonly static int registerEmailTempletId = 0;
        public readonly static int getpasswordEmailTempletId = 0;

        static UcConfig()
        {
            assSetuped = AppPlugin.GetAppModel("PlugNT.App.UCenter").setuped;

            if (File.Exists(WebConfig.ConfigPath + "plugin.config"))
            {
                XmlDocument xml = new XmlDocument();
                xml.Load(WebConfig.ConfigPath + "plugin.config");
                XmlNode control = xml.SelectSingleNode("/configs/plugitem[@name='PlugNT.App.UCenter']");
                XmlNode idlist = control.SelectSingleNode("assembly/ucenter/emailtempletidlist");
                string[] arr = idlist.InnerText.Split(',');

                registerEmailTempletId = int.Parse(arr[0]);
                getpasswordEmailTempletId = int.Parse(arr[1]);
            }
        }

    }


}

